from utils.RequestUtils import Request
from utils.log import LoggerUtils


class loginApi(object):

    def __init__(self):
        self.log = LoggerUtils().logger()
        self.request = Request()


    def login(self):
        """
        登录接口
        :return: 返回token
        """
        url = "https://stage.geer2.com/sys/company/user/login"
        data = {
            "userName":"聚拓医美测试平台",
            "password": "jt#123456"
        }
        response = self.request.post(url=url,json=data)
        token = response.json().get('data').get('token')
        return token

